" base settings{{{
syntax on
filetype plugin indent on
exec "nohlsearch"
set fdm=marker
set wildmenu
set t_Co=256
set nocompatible
set showcmd
set number
set relativenumber
set scrolloff=5
set ruler
set shiftwidth=4
set softtabstop=4
set tabstop=4
set autochdir
set backupcopy=yes
set ignorecase
set smartcase
set nowrapscan
set incsearch
set hlsearch
set noerrorbells
set novisualbell
set expandtab
set t_vb=
set magic
set autoindent
set smartindent
set backspace=indent,eol,start
set laststatus=2
set mouse=
set spelllang=en,cjk
set nospell
"}}}

" map settings{{{

" leader key
let mapleader=" "

" save
noremap S :w<CR>

" quit/exit
noremap Q :q<CR>

" source
noremap R :source ~/.vimrc<CR>

" quick command
noremap ; :

" next/pre buffer
nnoremap <C-j> :bn<CR>
nnoremap <C-k> :bp<CR>

nnoremap G Gzz

" quick jump 5 lines.
nnoremap J 5j
nnoremap K 5k

" copy & paste with system
noremap Y "+y
noremap P "+p

" jump to line start and line end
noremap H ^
noremap L $

" clear search highlight
nnoremap <LEADER><CR> :nohlsearch<CR>

" next/pre in search result
noremap n nzz
noremap N Nzz
"
" redo
nnoremap U <C-r>

" auto indent
nnoremap <C-f> ggVG=

" edit .vimrc file.
nnoremap .vimrc :e ~/.vimrc<CR>
"}}}
